package com.smedi.ismedi.notification.core.port.adapter.persistence.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @className: MailLogEntity
 * @Description: TODO
 * @version: v1.0.0
 * @author: wzx
 * @date: 2022/11/23 15:43
 */

@Data
@TableName(value = "ntf_mail_log")
public class MailLogEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "batch_id")
    private String batchId;

    @TableField(value = "message_content")
    private String messageContent;

    @TableField(value = "mail_num")
    private String mailNum;

    @TableField(value = "template_id")
    private Long templateId;

    @TableField(value = "succeed")
    private boolean succeed;

    @TableField(value = "error_message")
    private String errorMessage;

    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Long createdUserId;

    @TableField(value = "created_date", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime createdDate;

    @TableField("top_org_id")
    private String topOrgId;

    @TableField("tenant_id")
    private String tenantId;

}